/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hello;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author Liem
 */
public class VisualMIDlet extends MIDlet implements CommandListener {
    
    private boolean midletPaused = false;

//<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private Form Welcome;
    private Form MainMenu;
    private StringItem stringItem;
    private Spacer spacer;
    private Spacer spacer1;
    private ChoiceGroup choiceGroup;
    private Spacer spacer2;
    private Spacer spacer3;
    private ChoiceGroup choiceGroup1;
    private Form Quiz;
    private Form Materi;
    private Form PostTest;
    private Form Status;
    private Spacer spacer4;
    private StringItem stringItem2;
    private Spacer spacer5;
    private StringItem stringItem1;
    private Spacer spacer6;
    private StringItem stringItem3;
    private Spacer spacer7;
    private Spacer spacer8;
    private StringItem stringItem4;
    private Spacer spacer9;
    private StringItem stringItem5;
    private Spacer spacer10;
    private Spacer spacer11;
    private StringItem stringItem6;
    private Spacer spacer12;
    private StringItem stringItem7;
    private Spacer spacer13;
    private Spacer spacer14;
    private StringItem stringItem10;
    private Spacer spacer20;
    private Spacer spacer21;
    private Command exitCommand;
    private Command okCommand;
    private Command exitCommand1;
    private Command okCommand1;
    private Command backCommand1;
    private Command backCommand;
    private Command backCommand2;
    private Command backCommand3;
    private Command nextCommand2;
    private Command exitCommand2;
    private Command backCommand4;
    private Command exitCommand3;
    private Command backCommand5;
//</editor-fold>//GEN-END:|fields|0|
    /**
     * The VisualMIDlet constructor.
     */
    public VisualMIDlet() {
    }

//<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
//</editor-fold>//GEN-END:|methods|0|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
    /**
     * Initializes the application. It is called only once when the MIDlet is
     * started. The method is called before the
     * <code>startMIDlet</code> method.
     */
    private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
        // write pre-initialize user code here
//GEN-LINE:|0-initialize|1|0-postInitialize
        // write post-initialize user code here
    }//GEN-BEGIN:|0-initialize|2|
//</editor-fold>//GEN-END:|0-initialize|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Started point.
     */
    public void startMIDlet() {//GEN-END:|3-startMIDlet|0|3-preAction
        // write pre-action user code here
        switchDisplayable(null, getWelcome());//GEN-LINE:|3-startMIDlet|1|3-postAction
        // write post-action user code here
    }//GEN-BEGIN:|3-startMIDlet|2|
//</editor-fold>//GEN-END:|3-startMIDlet|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
     */
    public void resumeMIDlet() {//GEN-END:|4-resumeMIDlet|0|4-preAction
        // write pre-action user code here
        switchDisplayable(null, getMainMenu());//GEN-LINE:|4-resumeMIDlet|1|4-postAction
        // write post-action user code here
    }//GEN-BEGIN:|4-resumeMIDlet|2|
//</editor-fold>//GEN-END:|4-resumeMIDlet|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
    /**
     * Switches a current displayable in a display. The
     * <code>display</code> instance is taken from
     * <code>getDisplay</code> method. This method is used by all actions in the
     * design for switching displayable.
     *
     * @param alert the Alert which is temporarily set to the display; if
     * <code>null</code>, then
     * <code>nextDisplayable</code> is set immediately
     * @param nextDisplayable the Displayable to be set
     */
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|5-switchDisplayable|0|5-preSwitch
        // write pre-switch user code here
        Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
        if (alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }//GEN-END:|5-switchDisplayable|1|5-postSwitch
        // write post-switch user code here
    }//GEN-BEGIN:|5-switchDisplayable|2|
//</editor-fold>//GEN-END:|5-switchDisplayable|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
    /**
     * Called by a system to indicated that a command has been invoked on a
     * particular displayable.
     *
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
        // write pre-action user code here
        if (displayable == MainMenu) {//GEN-BEGIN:|7-commandAction|1|27-preAction
            if (command == exitCommand1) {//GEN-END:|7-commandAction|1|27-preAction
                // write pre-action user code here
                exitMIDlet();//GEN-LINE:|7-commandAction|2|27-postAction
                // write post-action user code here
            } else if (command == okCommand1) {//GEN-LINE:|7-commandAction|3|31-preAction
                // write pre-action user code here
                method();//GEN-LINE:|7-commandAction|4|31-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|5|63-preAction
        } else if (displayable == Materi) {
            if (command == backCommand2) {//GEN-END:|7-commandAction|5|63-preAction
                // write pre-action user code here
                switchDisplayable(null, getMainMenu());//GEN-LINE:|7-commandAction|6|63-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|7|57-preAction
        } else if (displayable == PostTest) {
            if (command == backCommand) {//GEN-END:|7-commandAction|7|57-preAction
                // write pre-action user code here
                switchDisplayable(null, getMainMenu());//GEN-LINE:|7-commandAction|8|57-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|9|161-preAction
        } else if (displayable == Quiz) {
            if (command == backCommand5) {//GEN-END:|7-commandAction|9|161-preAction
                // write pre-action user code here
                switchDisplayable(null, getMainMenu());//GEN-LINE:|7-commandAction|10|161-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|11|138-preAction
        } else if (displayable == Status) {
            if (command == exitCommand2) {//GEN-END:|7-commandAction|11|138-preAction
                // write pre-action user code here
                switchDisplayable(null, getMainMenu());//GEN-LINE:|7-commandAction|12|138-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|13|17-preAction
        } else if (displayable == Welcome) {
            if (command == exitCommand) {//GEN-END:|7-commandAction|13|17-preAction
                // write pre-action user code here
                exitMIDlet();//GEN-LINE:|7-commandAction|14|17-postAction
                // write post-action user code here
            } else if (command == okCommand) {//GEN-LINE:|7-commandAction|15|24-preAction
                // write pre-action user code here
                switchDisplayable(null, getMainMenu());//GEN-LINE:|7-commandAction|16|24-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|17|7-postCommandAction
        }//GEN-END:|7-commandAction|17|7-postCommandAction
        // write post-action user code here
    }//GEN-BEGIN:|7-commandAction|18|
//</editor-fold>//GEN-END:|7-commandAction|18|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: Welcome ">//GEN-BEGIN:|14-getter|0|14-preInit
    /**
     * Returns an initialized instance of Welcome component.
     *
     * @return the initialized component instance
     */
    public Form getWelcome() {
        if (Welcome == null) {//GEN-END:|14-getter|0|14-preInit
            // write pre-init user code here
            Welcome = new Form("Mobile Accounting");//GEN-BEGIN:|14-getter|1|14-postInit
            Welcome.addCommand(getExitCommand());
            Welcome.addCommand(getOkCommand());
            Welcome.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit
            // write post-init user code here
        }//GEN-BEGIN:|14-getter|2|
        return Welcome;
    }
//</editor-fold>//GEN-END:|14-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">//GEN-BEGIN:|16-getter|0|16-preInit
    /**
     * Returns an initialized instance of exitCommand component.
     *
     * @return the initialized component instance
     */
    public Command getExitCommand() {
        if (exitCommand == null) {//GEN-END:|16-getter|0|16-preInit
            // write pre-init user code here
            exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|16-getter|1|16-postInit
            // write post-init user code here
        }//GEN-BEGIN:|16-getter|2|
        return exitCommand;
    }
//</editor-fold>//GEN-END:|16-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: method ">//GEN-BEGIN:|32-switch|0|32-preSwitch
    /**
     * Performs an action assigned to the method switch-point.
     */
    public void method() {//GEN-END:|32-switch|0|32-preSwitch
        // enter pre-switch user code here
        
        switch (choiceGroup.getSelectedIndex()) {//GEN-BEGIN:|32-switch|1|33-preAction
            case 0://GEN-END:|32-switch|1|33-preAction
                // write pre-action user code here
                isMateri();//GEN-LINE:|32-switch|2|33-postAction
                // write post-action user code here
                break;//GEN-BEGIN:|32-switch|3|34-preAction
            case 1://GEN-END:|32-switch|3|34-preAction
                // write pre-action user code here
                isMateri();//GEN-LINE:|32-switch|4|34-postAction
                // write post-action user code here
                break;//GEN-BEGIN:|32-switch|5|35-preAction
            case 2://GEN-END:|32-switch|5|35-preAction
                // write pre-action user code here
                isMateri();//GEN-LINE:|32-switch|6|35-postAction
                // write post-action user code here
                break;//GEN-BEGIN:|32-switch|7|36-preAction
            case 3://GEN-END:|32-switch|7|36-preAction
                // write pre-action user code here
                switchDisplayable(null, getPostTest());//GEN-LINE:|32-switch|8|36-postAction
                // write post-action user code here
                break;//GEN-BEGIN:|32-switch|9|37-preAction
            case 4://GEN-END:|32-switch|9|37-preAction
                // write pre-action user code here
                switchDisplayable(null, getStatus());//GEN-LINE:|32-switch|10|37-postAction
                // write post-action user code here
                break;//GEN-BEGIN:|32-switch|11|32-postSwitch
        }//GEN-END:|32-switch|11|32-postSwitch
        // enter post-switch user code here
    }//GEN-BEGIN:|32-switch|12|
//</editor-fold>//GEN-END:|32-switch|12|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: isMateri ">//GEN-BEGIN:|39-if|0|39-preIf
    /**
     * Performs an action assigned to the isMateri if-point.
     */
    public void isMateri() {//GEN-END:|39-if|0|39-preIf
        // enter pre-if user code here
        if (choiceGroup1.getSelectedIndex() == 0) {//GEN-LINE:|39-if|1|40-preAction
            // write pre-action user code here
            switchDisplayable(null, getMateri());//GEN-LINE:|39-if|2|40-postAction
            // write post-action user code here
        } else {//GEN-LINE:|39-if|3|41-preAction
            // write pre-action user code here
            switchDisplayable(null, getQuiz());//GEN-LINE:|39-if|4|41-postAction
            // write post-action user code here
        }//GEN-LINE:|39-if|5|39-postIf
        // enter post-if user code here
    }//GEN-BEGIN:|39-if|6|
//</editor-fold>//GEN-END:|39-if|6|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: MainMenu ">//GEN-BEGIN:|22-getter|0|22-preInit
    /**
     * Returns an initialized instance of MainMenu component.
     *
     * @return the initialized component instance
     */
    public Form getMainMenu() {
        if (MainMenu == null) {//GEN-END:|22-getter|0|22-preInit
            // write pre-init user code here
            MainMenu = new Form("Menu Utama", new Item[]{getStringItem(), getSpacer(), getSpacer1(), getChoiceGroup(), getSpacer2(), getSpacer3(), getChoiceGroup1()});//GEN-BEGIN:|22-getter|1|22-postInit
            MainMenu.addCommand(getExitCommand1());
            MainMenu.addCommand(getOkCommand1());
            MainMenu.setCommandListener(this);//GEN-END:|22-getter|1|22-postInit
            // write post-init user code here
        }//GEN-BEGIN:|22-getter|2|
        return MainMenu;
    }
//</editor-fold>//GEN-END:|22-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: Status ">//GEN-BEGIN:|48-getter|0|48-preInit
    /**
     * Returns an initialized instance of Status component.
     *
     * @return the initialized component instance
     */
    public Form getStatus() {
        if (Status == null) {//GEN-END:|48-getter|0|48-preInit
            // write pre-init user code here
            Status = new Form("Status", new Item[]{getStringItem1(), getSpacer4(), getSpacer5(), getStringItem2(), getSpacer6(), getStringItem3(), getSpacer7(), getSpacer8(), getStringItem4(), getSpacer9(), getStringItem5(), getSpacer10(), getSpacer11(), getStringItem6(), getSpacer12(), getStringItem7(), getSpacer13(), getSpacer14(), getStringItem10(), getSpacer20(), getSpacer21()});//GEN-BEGIN:|48-getter|1|48-postInit
            Status.addCommand(getExitCommand2());
            Status.setCommandListener(this);//GEN-END:|48-getter|1|48-postInit
            // write post-init user code here
        }//GEN-BEGIN:|48-getter|2|
        return Status;
    }
//</editor-fold>//GEN-END:|48-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: PostTest ">//GEN-BEGIN:|49-getter|0|49-preInit
    /**
     * Returns an initialized instance of PostTest component.
     *
     * @return the initialized component instance
     */
    public Form getPostTest() {
        if (PostTest == null) {//GEN-END:|49-getter|0|49-preInit
            // write pre-init user code here
            PostTest = new Form("Post Test");//GEN-BEGIN:|49-getter|1|49-postInit
            PostTest.addCommand(getBackCommand());
            PostTest.setCommandListener(this);//GEN-END:|49-getter|1|49-postInit
            // write post-init user code here
        }//GEN-BEGIN:|49-getter|2|
        return PostTest;
    }
//</editor-fold>//GEN-END:|49-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: Materi ">//GEN-BEGIN:|50-getter|0|50-preInit
    /**
     * Returns an initialized instance of Materi component.
     *
     * @return the initialized component instance
     */
    public Form getMateri() {
        if (Materi == null) {//GEN-END:|50-getter|0|50-preInit
            // write pre-init user code here
            Materi = new Form("Materi");//GEN-BEGIN:|50-getter|1|50-postInit
            Materi.addCommand(getBackCommand2());
            Materi.setCommandListener(this);//GEN-END:|50-getter|1|50-postInit
            // write post-init user code here
        }//GEN-BEGIN:|50-getter|2|
        return Materi;
    }
//</editor-fold>//GEN-END:|50-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: Quiz ">//GEN-BEGIN:|51-getter|0|51-preInit
    /**
     * Returns an initialized instance of Quiz component.
     *
     * @return the initialized component instance
     */
    public Form getQuiz() {
        if (Quiz == null) {//GEN-END:|51-getter|0|51-preInit
            // write pre-init user code here
            Quiz = new Form("Quiz");//GEN-BEGIN:|51-getter|1|51-postInit
            Quiz.addCommand(getBackCommand5());
            Quiz.setCommandListener(this);//GEN-END:|51-getter|1|51-postInit
            // write post-init user code here
        }//GEN-BEGIN:|51-getter|2|
        return Quiz;
    }
//</editor-fold>//GEN-END:|51-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand ">//GEN-BEGIN:|23-getter|0|23-preInit
    /**
     * Returns an initialized instance of okCommand component.
     *
     * @return the initialized component instance
     */
    public Command getOkCommand() {
        if (okCommand == null) {//GEN-END:|23-getter|0|23-preInit
            // write pre-init user code here
            okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|23-getter|1|23-postInit
            // write post-init user code here
        }//GEN-BEGIN:|23-getter|2|
        return okCommand;
    }
//</editor-fold>//GEN-END:|23-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand1 ">//GEN-BEGIN:|26-getter|0|26-preInit
    /**
     * Returns an initialized instance of exitCommand1 component.
     *
     * @return the initialized component instance
     */
    public Command getExitCommand1() {
        if (exitCommand1 == null) {//GEN-END:|26-getter|0|26-preInit
            // write pre-init user code here
            exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|26-getter|1|26-postInit
            // write post-init user code here
        }//GEN-BEGIN:|26-getter|2|
        return exitCommand1;
    }
//</editor-fold>//GEN-END:|26-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand1 ">//GEN-BEGIN:|30-getter|0|30-preInit
    /**
     * Returns an initialized instance of okCommand1 component.
     *
     * @return the initialized component instance
     */
    public Command getOkCommand1() {
        if (okCommand1 == null) {//GEN-END:|30-getter|0|30-preInit
            // write pre-init user code here
            okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|30-getter|1|30-postInit
            // write post-init user code here
        }//GEN-BEGIN:|30-getter|2|
        return okCommand1;
    }
//</editor-fold>//GEN-END:|30-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">//GEN-BEGIN:|56-getter|0|56-preInit
    /**
     * Returns an initialized instance of backCommand component.
     *
     * @return the initialized component instance
     */
    public Command getBackCommand() {
        if (backCommand == null) {//GEN-END:|56-getter|0|56-preInit
            // write pre-init user code here
            backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|56-getter|1|56-postInit
            // write post-init user code here
        }//GEN-BEGIN:|56-getter|2|
        return backCommand;
    }
//</editor-fold>//GEN-END:|56-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand1 ">//GEN-BEGIN:|58-getter|0|58-preInit
    /**
     * Returns an initialized instance of backCommand1 component.
     *
     * @return the initialized component instance
     */
    public Command getBackCommand1() {
        if (backCommand1 == null) {//GEN-END:|58-getter|0|58-preInit
            // write pre-init user code here
            backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|58-getter|1|58-postInit
            // write post-init user code here
        }//GEN-BEGIN:|58-getter|2|
        return backCommand1;
    }
//</editor-fold>//GEN-END:|58-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand2 ">//GEN-BEGIN:|62-getter|0|62-preInit
    /**
     * Returns an initialized instance of backCommand2 component.
     *
     * @return the initialized component instance
     */
    public Command getBackCommand2() {
        if (backCommand2 == null) {//GEN-END:|62-getter|0|62-preInit
            // write pre-init user code here
            backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|62-getter|1|62-postInit
            // write post-init user code here
        }//GEN-BEGIN:|62-getter|2|
        return backCommand2;
    }
//</editor-fold>//GEN-END:|62-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand3 ">//GEN-BEGIN:|64-getter|0|64-preInit
    /**
     * Returns an initialized instance of backCommand3 component.
     *
     * @return the initialized component instance
     */
    public Command getBackCommand3() {
        if (backCommand3 == null) {//GEN-END:|64-getter|0|64-preInit
            // write pre-init user code here
            backCommand3 = new Command("Back", Command.BACK, 0);//GEN-LINE:|64-getter|1|64-postInit
            // write post-init user code here
        }//GEN-BEGIN:|64-getter|2|
        return backCommand3;
    }
//</editor-fold>//GEN-END:|64-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">//GEN-BEGIN:|67-getter|0|67-preInit
    /**
     * Returns an initialized instance of stringItem component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem() {
        if (stringItem == null) {//GEN-END:|67-getter|0|67-preInit
            // write pre-init user code here
            stringItem = new StringItem("", "Silahkan masukkan pilihan anda:");//GEN-LINE:|67-getter|1|67-postInit
            // write post-init user code here
        }//GEN-BEGIN:|67-getter|2|
        return stringItem;
    }
//</editor-fold>//GEN-END:|67-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer ">//GEN-BEGIN:|69-getter|0|69-preInit
    /**
     * Returns an initialized instance of spacer component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer() {
        if (spacer == null) {//GEN-END:|69-getter|0|69-preInit
            // write pre-init user code here
            spacer = new Spacer(16, 1);//GEN-LINE:|69-getter|1|69-postInit
            // write post-init user code here
        }//GEN-BEGIN:|69-getter|2|
        return spacer;
    }
//</editor-fold>//GEN-END:|69-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer1 ">//GEN-BEGIN:|70-getter|0|70-preInit
    /**
     * Returns an initialized instance of spacer1 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer1() {
        if (spacer1 == null) {//GEN-END:|70-getter|0|70-preInit
            // write pre-init user code here
            spacer1 = new Spacer(16, 1);//GEN-LINE:|70-getter|1|70-postInit
            // write post-init user code here
        }//GEN-BEGIN:|70-getter|2|
        return spacer1;
    }
//</editor-fold>//GEN-END:|70-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup ">//GEN-BEGIN:|71-getter|0|71-preInit
    /**
     * Returns an initialized instance of choiceGroup component.
     *
     * @return the initialized component instance
     */
    public ChoiceGroup getChoiceGroup() {
        if (choiceGroup == null) {//GEN-END:|71-getter|0|71-preInit
            // write pre-init user code here
            choiceGroup = new ChoiceGroup("BAB yang akan diambil:", Choice.EXCLUSIVE);//GEN-BEGIN:|71-getter|1|71-postInit
            choiceGroup.append("BAB 1", null);
            choiceGroup.append("BAB 2", null);
            choiceGroup.append("BAB 3", null);
            choiceGroup.append("POST TEST", null);
            choiceGroup.append("CEK STATUS", null);
            choiceGroup.setSelectedFlags(new boolean[]{false, false, false, false, false});//GEN-END:|71-getter|1|71-postInit
            // write post-init user code here
        }//GEN-BEGIN:|71-getter|2|
        return choiceGroup;
    }
//</editor-fold>//GEN-END:|71-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer2 ">//GEN-BEGIN:|72-getter|0|72-preInit
    /**
     * Returns an initialized instance of spacer2 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer2() {
        if (spacer2 == null) {//GEN-END:|72-getter|0|72-preInit
            // write pre-init user code here
            spacer2 = new Spacer(16, 1);//GEN-LINE:|72-getter|1|72-postInit
            // write post-init user code here
        }//GEN-BEGIN:|72-getter|2|
        return spacer2;
    }
//</editor-fold>//GEN-END:|72-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer3 ">//GEN-BEGIN:|73-getter|0|73-preInit
    /**
     * Returns an initialized instance of spacer3 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer3() {
        if (spacer3 == null) {//GEN-END:|73-getter|0|73-preInit
            // write pre-init user code here
            spacer3 = new Spacer(16, 1);//GEN-LINE:|73-getter|1|73-postInit
            // write post-init user code here
        }//GEN-BEGIN:|73-getter|2|
        return spacer3;
    }
//</editor-fold>//GEN-END:|73-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup1 ">//GEN-BEGIN:|74-getter|0|74-preInit
    /**
     * Returns an initialized instance of choiceGroup1 component.
     *
     * @return the initialized component instance
     */
    public ChoiceGroup getChoiceGroup1() {
        if (choiceGroup1 == null) {//GEN-END:|74-getter|0|74-preInit
            // write pre-init user code here
            choiceGroup1 = new ChoiceGroup("", Choice.EXCLUSIVE);//GEN-BEGIN:|74-getter|1|74-postInit
            choiceGroup1.append("MATERI", null);
            choiceGroup1.append("QUIZ", null);
            choiceGroup1.setSelectedFlags(new boolean[]{false, false});//GEN-END:|74-getter|1|74-postInit
            // write post-init user code here
        }//GEN-BEGIN:|74-getter|2|
        return choiceGroup1;
    }
//</editor-fold>//GEN-END:|74-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer4 ">//GEN-BEGIN:|88-getter|0|88-preInit
    /**
     * Returns an initialized instance of spacer4 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer4() {
        if (spacer4 == null) {//GEN-END:|88-getter|0|88-preInit
            // write pre-init user code here
            spacer4 = new Spacer(16, 1);//GEN-LINE:|88-getter|1|88-postInit
            // write post-init user code here
        }//GEN-BEGIN:|88-getter|2|
        return spacer4;
    }
//</editor-fold>//GEN-END:|88-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem2 ">//GEN-BEGIN:|90-getter|0|90-preInit
    /**
     * Returns an initialized instance of stringItem2 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem2() {
        if (stringItem2 == null) {//GEN-END:|90-getter|0|90-preInit
            // write pre-init user code here
            stringItem2 = new StringItem("BAB 1 Materi", null);//GEN-LINE:|90-getter|1|90-postInit
            // write post-init user code here
        }//GEN-BEGIN:|90-getter|2|
        return stringItem2;
    }
//</editor-fold>//GEN-END:|90-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer5 ">//GEN-BEGIN:|89-getter|0|89-preInit
    /**
     * Returns an initialized instance of spacer5 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer5() {
        if (spacer5 == null) {//GEN-END:|89-getter|0|89-preInit
            // write pre-init user code here
            spacer5 = new Spacer(16, 1);//GEN-LINE:|89-getter|1|89-postInit
            // write post-init user code here
        }//GEN-BEGIN:|89-getter|2|
        return spacer5;
    }
//</editor-fold>//GEN-END:|89-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem1 ">//GEN-BEGIN:|83-getter|0|83-preInit
    /**
     * Returns an initialized instance of stringItem1 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem1() {
        if (stringItem1 == null) {//GEN-END:|83-getter|0|83-preInit
            // write pre-init user code here
            stringItem1 = new StringItem("Status Pembelajaran anda saat ini:", null);//GEN-LINE:|83-getter|1|83-postInit
            // write post-init user code here
        }//GEN-BEGIN:|83-getter|2|
        return stringItem1;
    }
//</editor-fold>//GEN-END:|83-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer6 ">//GEN-BEGIN:|91-getter|0|91-preInit
    /**
     * Returns an initialized instance of spacer6 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer6() {
        if (spacer6 == null) {//GEN-END:|91-getter|0|91-preInit
            // write pre-init user code here
            spacer6 = new Spacer(16, 1);//GEN-LINE:|91-getter|1|91-postInit
            // write post-init user code here
        }//GEN-BEGIN:|91-getter|2|
        return spacer6;
    }
//</editor-fold>//GEN-END:|91-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem3 ">//GEN-BEGIN:|121-getter|0|121-preInit
    /**
     * Returns an initialized instance of stringItem3 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem3() {
        if (stringItem3 == null) {//GEN-END:|121-getter|0|121-preInit
            // write pre-init user code here
            stringItem3 = new StringItem("BAB 1 Quiz", null);//GEN-LINE:|121-getter|1|121-postInit
            // write post-init user code here
        }//GEN-BEGIN:|121-getter|2|
        return stringItem3;
    }
//</editor-fold>//GEN-END:|121-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer7 ">//GEN-BEGIN:|122-getter|0|122-preInit
    /**
     * Returns an initialized instance of spacer7 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer7() {
        if (spacer7 == null) {//GEN-END:|122-getter|0|122-preInit
            // write pre-init user code here
            spacer7 = new Spacer(16, 1);//GEN-LINE:|122-getter|1|122-postInit
            // write post-init user code here
        }//GEN-BEGIN:|122-getter|2|
        return spacer7;
    }
//</editor-fold>//GEN-END:|122-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer8 ">//GEN-BEGIN:|123-getter|0|123-preInit
    /**
     * Returns an initialized instance of spacer8 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer8() {
        if (spacer8 == null) {//GEN-END:|123-getter|0|123-preInit
            // write pre-init user code here
            spacer8 = new Spacer(16, 1);//GEN-LINE:|123-getter|1|123-postInit
            // write post-init user code here
        }//GEN-BEGIN:|123-getter|2|
        return spacer8;
    }
//</editor-fold>//GEN-END:|123-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem4 ">//GEN-BEGIN:|124-getter|0|124-preInit
    /**
     * Returns an initialized instance of stringItem4 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem4() {
        if (stringItem4 == null) {//GEN-END:|124-getter|0|124-preInit
            // write pre-init user code here
            stringItem4 = new StringItem("BAB 2 Materi", null);//GEN-LINE:|124-getter|1|124-postInit
            // write post-init user code here
        }//GEN-BEGIN:|124-getter|2|
        return stringItem4;
    }
//</editor-fold>//GEN-END:|124-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer9 ">//GEN-BEGIN:|125-getter|0|125-preInit
    /**
     * Returns an initialized instance of spacer9 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer9() {
        if (spacer9 == null) {//GEN-END:|125-getter|0|125-preInit
            // write pre-init user code here
            spacer9 = new Spacer(16, 1);//GEN-LINE:|125-getter|1|125-postInit
            // write post-init user code here
        }//GEN-BEGIN:|125-getter|2|
        return spacer9;
    }
//</editor-fold>//GEN-END:|125-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem5 ">//GEN-BEGIN:|126-getter|0|126-preInit
    /**
     * Returns an initialized instance of stringItem5 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem5() {
        if (stringItem5 == null) {//GEN-END:|126-getter|0|126-preInit
            // write pre-init user code here
            stringItem5 = new StringItem("BAB 2 Quiz", null);//GEN-LINE:|126-getter|1|126-postInit
            // write post-init user code here
        }//GEN-BEGIN:|126-getter|2|
        return stringItem5;
    }
//</editor-fold>//GEN-END:|126-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer10 ">//GEN-BEGIN:|127-getter|0|127-preInit
    /**
     * Returns an initialized instance of spacer10 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer10() {
        if (spacer10 == null) {//GEN-END:|127-getter|0|127-preInit
            // write pre-init user code here
            spacer10 = new Spacer(16, 1);//GEN-LINE:|127-getter|1|127-postInit
            // write post-init user code here
        }//GEN-BEGIN:|127-getter|2|
        return spacer10;
    }
//</editor-fold>//GEN-END:|127-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer11 ">//GEN-BEGIN:|128-getter|0|128-preInit
    /**
     * Returns an initialized instance of spacer11 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer11() {
        if (spacer11 == null) {//GEN-END:|128-getter|0|128-preInit
            // write pre-init user code here
            spacer11 = new Spacer(16, 1);//GEN-LINE:|128-getter|1|128-postInit
            // write post-init user code here
        }//GEN-BEGIN:|128-getter|2|
        return spacer11;
    }
//</editor-fold>//GEN-END:|128-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem6 ">//GEN-BEGIN:|129-getter|0|129-preInit
    /**
     * Returns an initialized instance of stringItem6 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem6() {
        if (stringItem6 == null) {//GEN-END:|129-getter|0|129-preInit
            // write pre-init user code here
            stringItem6 = new StringItem("BAB 3 Materi", null);//GEN-LINE:|129-getter|1|129-postInit
            // write post-init user code here
        }//GEN-BEGIN:|129-getter|2|
        return stringItem6;
    }
//</editor-fold>//GEN-END:|129-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer12 ">//GEN-BEGIN:|130-getter|0|130-preInit
    /**
     * Returns an initialized instance of spacer12 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer12() {
        if (spacer12 == null) {//GEN-END:|130-getter|0|130-preInit
            // write pre-init user code here
            spacer12 = new Spacer(16, 1);//GEN-LINE:|130-getter|1|130-postInit
            // write post-init user code here
        }//GEN-BEGIN:|130-getter|2|
        return spacer12;
    }
//</editor-fold>//GEN-END:|130-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem7 ">//GEN-BEGIN:|131-getter|0|131-preInit
    /**
     * Returns an initialized instance of stringItem7 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem7() {
        if (stringItem7 == null) {//GEN-END:|131-getter|0|131-preInit
            // write pre-init user code here
            stringItem7 = new StringItem("BAB 3 Quiz", null);//GEN-LINE:|131-getter|1|131-postInit
            // write post-init user code here
        }//GEN-BEGIN:|131-getter|2|
        return stringItem7;
    }
//</editor-fold>//GEN-END:|131-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer13 ">//GEN-BEGIN:|132-getter|0|132-preInit
    /**
     * Returns an initialized instance of spacer13 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer13() {
        if (spacer13 == null) {//GEN-END:|132-getter|0|132-preInit
            // write pre-init user code here
            spacer13 = new Spacer(16, 1);//GEN-LINE:|132-getter|1|132-postInit
            // write post-init user code here
        }//GEN-BEGIN:|132-getter|2|
        return spacer13;
    }
//</editor-fold>//GEN-END:|132-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer14 ">//GEN-BEGIN:|133-getter|0|133-preInit
    /**
     * Returns an initialized instance of spacer14 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer14() {
        if (spacer14 == null) {//GEN-END:|133-getter|0|133-preInit
            // write pre-init user code here
            spacer14 = new Spacer(16, 1);//GEN-LINE:|133-getter|1|133-postInit
            // write post-init user code here
        }//GEN-BEGIN:|133-getter|2|
        return spacer14;
    }
//</editor-fold>//GEN-END:|133-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem10 ">//GEN-BEGIN:|154-getter|0|154-preInit
    /**
     * Returns an initialized instance of stringItem10 component.
     *
     * @return the initialized component instance
     */
    public StringItem getStringItem10() {
        if (stringItem10 == null) {//GEN-END:|154-getter|0|154-preInit
            // write pre-init user code here
            stringItem10 = new StringItem("POST TEST", null);//GEN-LINE:|154-getter|1|154-postInit
            // write post-init user code here
        }//GEN-BEGIN:|154-getter|2|
        return stringItem10;
    }
//</editor-fold>//GEN-END:|154-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer20 ">//GEN-BEGIN:|155-getter|0|155-preInit
    /**
     * Returns an initialized instance of spacer20 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer20() {
        if (spacer20 == null) {//GEN-END:|155-getter|0|155-preInit
            // write pre-init user code here
            spacer20 = new Spacer(16, 1);//GEN-LINE:|155-getter|1|155-postInit
            // write post-init user code here
        }//GEN-BEGIN:|155-getter|2|
        return spacer20;
    }
//</editor-fold>//GEN-END:|155-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: spacer21 ">//GEN-BEGIN:|157-getter|0|157-preInit
    /**
     * Returns an initialized instance of spacer21 component.
     *
     * @return the initialized component instance
     */
    public Spacer getSpacer21() {
        if (spacer21 == null) {//GEN-END:|157-getter|0|157-preInit
            // write pre-init user code here
            spacer21 = new Spacer(16, 1);//GEN-LINE:|157-getter|1|157-postInit
            // write post-init user code here
        }//GEN-BEGIN:|157-getter|2|
        return spacer21;
    }
//</editor-fold>//GEN-END:|157-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: nextCommand2 ">//GEN-BEGIN:|135-getter|0|135-preInit
    /**
     * Returns an initialized instance of nextCommand2 component.
     *
     * @return the initialized component instance
     */
    public Command getNextCommand2() {
        if (nextCommand2 == null) {//GEN-END:|135-getter|0|135-preInit
            // write pre-init user code here
            nextCommand2 = new Command("Next", Command.OK, 0);//GEN-LINE:|135-getter|1|135-postInit
            // write post-init user code here
        }//GEN-BEGIN:|135-getter|2|
        return nextCommand2;
    }
//</editor-fold>//GEN-END:|135-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand2 ">//GEN-BEGIN:|137-getter|0|137-preInit
    /**
     * Returns an initialized instance of exitCommand2 component.
     *
     * @return the initialized component instance
     */
    public Command getExitCommand2() {
        if (exitCommand2 == null) {//GEN-END:|137-getter|0|137-preInit
            // write pre-init user code here
            exitCommand2 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|137-getter|1|137-postInit
            // write post-init user code here
        }//GEN-BEGIN:|137-getter|2|
        return exitCommand2;
    }
//</editor-fold>//GEN-END:|137-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand4 ">//GEN-BEGIN:|139-getter|0|139-preInit
    /**
     * Returns an initialized instance of backCommand4 component.
     *
     * @return the initialized component instance
     */
    public Command getBackCommand4() {
        if (backCommand4 == null) {//GEN-END:|139-getter|0|139-preInit
            // write pre-init user code here
            backCommand4 = new Command("Back", Command.BACK, 0);//GEN-LINE:|139-getter|1|139-postInit
            // write post-init user code here
        }//GEN-BEGIN:|139-getter|2|
        return backCommand4;
    }
//</editor-fold>//GEN-END:|139-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand3 ">//GEN-BEGIN:|141-getter|0|141-preInit
    /**
     * Returns an initialized instance of exitCommand3 component.
     *
     * @return the initialized component instance
     */
    public Command getExitCommand3() {
        if (exitCommand3 == null) {//GEN-END:|141-getter|0|141-preInit
            // write pre-init user code here
            exitCommand3 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|141-getter|1|141-postInit
            // write post-init user code here
        }//GEN-BEGIN:|141-getter|2|
        return exitCommand3;
    }
//</editor-fold>//GEN-END:|141-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand5 ">//GEN-BEGIN:|160-getter|0|160-preInit
    /**
     * Returns an initialized instance of backCommand5 component.
     *
     * @return the initialized component instance
     */
    public Command getBackCommand5() {
        if (backCommand5 == null) {//GEN-END:|160-getter|0|160-preInit
            // write pre-init user code here
            backCommand5 = new Command("Back", Command.BACK, 0);//GEN-LINE:|160-getter|1|160-postInit
            // write post-init user code here
        }//GEN-BEGIN:|160-getter|2|
        return backCommand5;
    }
//</editor-fold>//GEN-END:|160-getter|2|

    /**
     * Returns a display instance.
     *
     * @return the display instance.
     */
    public Display getDisplay() {
        return Display.getDisplay(this);
    }

    /**
     * Exits MIDlet.
     */
    public void exitMIDlet() {
        switchDisplayable(null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    /**
     * Called when MIDlet is started. Checks whether the MIDlet have been
     * already started and initialize/starts or resumes the MIDlet.
     */
    public void startApp() {
        if (midletPaused) {
            resumeMIDlet();
        } else {
            initialize();
            startMIDlet();
        }
        midletPaused = false;
    }

    /**
     * Called when MIDlet is paused.
     */
    public void pauseApp() {
        midletPaused = true;
    }

    /**
     * Called to signal the MIDlet to terminate.
     *
     * @param unconditional if true, then the MIDlet has to be unconditionally
     * terminated and all resources has to be released.
     */
    public void destroyApp(boolean unconditional) {
    }
}
